home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / rfc / rfc1487 < prev    next >
Text File  |  1993-07-28  |  45KB  |  1,180 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                           W. Yeong
  8. Request for Comments: 1487             Performance Systems International
  9.                                                                 T. Howes
  10.                                                   University of Michigan
  11.                                                                 S. Kille
  12.                                                         ISODE Consortium
  13.                                                                July 1993
  14.  
  15.  
  16.               X.500 Lightweight Directory Access Protocol
  17.  
  18. Status of this Memo
  19.  
  20.    This RFC specifies an IAB standards track protocol for the Internet
  21.    community, and requests discussion and suggestions for improvements.
  22.    Please refer to the current edition of the "IAB Official Protocol
  23.    Standards" for the standardization state and status of this protocol.
  24.    Distribution of this memo is unlimited.
  25.  
  26. Abstract
  27.  
  28.    The protocol described in this document is designed to provide access
  29.    to the Directory while not incurring the resource requirements of the
  30.    Directory Access Protocol (DAP). This protocol is specifically
  31.    targeted at simple management applications and browser applications
  32.    that provide simple read/write interactive access to the Directory,
  33.    and is intended to be a complement to the DAP itself.
  34.  
  35.    Key aspects of LDAP are:
  36.  
  37.    - Protocol elements are carried directly over TCP or other transport,
  38.      bypassing much of the session/presentation overhead.
  39.  
  40.    - Many protocol data elements are encoding as ordinary strings (e.g.,
  41.      Distinguished Names).
  42.  
  43.    - A lightweight BER encoding is used to encode all protocol elements.
  44.  
  45. 1.  History
  46.  
  47.    The tremendous interest in X.500 [1,2] technology in the Internet has
  48.    lead to efforts to reduce the high "cost of entry" associated with
  49.    use of the technology, such as the Directory Assistance Service [3]
  50.    and DIXIE [4]. While efforts such as these have met with success,
  51.    they have been solutions based on particular implementations and as
  52.    such have limited applicability.  This document continues the efforts
  53.    to define Directory protocol alternatives but departs from previous
  54.    efforts in that it consciously avoids dependence on particular
  55.  
  56.  
  57.  
  58. Yeong, Howes & Kille                                            [Page 1]
  59.  
  60. RFC 1487                       X.500 LDAP                      July 1993
  61.  
  62.  
  63.    implementations.
  64.  
  65. 2.  Protocol Model
  66.  
  67.    The general model adopted by this protocol is one of clients
  68.    performing protocol operations against servers. In this model, this
  69.    is accomplished by a client transmitting a protocol request
  70.    describing the operation to be performed to a server, which is then
  71.    responsible for performing the necessary operations on the Directory.
  72.    Upon completion of the necessary operations, the server returns a
  73.    response containing any results or errors to the requesting client.
  74.    In keeping with the goal of easing the costs associated with use of
  75.    the Directory, it is an objective of this protocol to minimize the
  76.    complexity of clients so as to facilitate widespread deployment of
  77.    applications capable of utilizing the Directory.
  78.  
  79.    Note that, although servers are required to return responses whenever
  80.    such responses are defined in the protocol, there is no requirement
  81.    for synchronous behavior on the part of either client or server
  82.    implementations: requests and responses for multiple operations may
  83.    be exchanged by client and servers in any order, as long as clients
  84.    eventually receive a response for every request that requires one.
  85.  
  86.    Consistent with the model of servers performing protocol operations
  87.    on behalf of clients, it is also to be noted that protocol servers
  88.    are expected to handle referrals without resorting to the return of
  89.    such referrals to the client. This protocol makes no provisions for
  90.    the return of referrals to clients, as the model is one of servers
  91.    ensuring the performance of all necessary operations in the
  92.    Directory, with only final results or errors being returned by
  93.    servers to clients.
  94.  
  95.    Note that this protocol can be mapped to a strict subset of the
  96.    directory abstract service, so it can be cleanly provided by the DAP.
  97.  
  98. 3.  Mapping Onto Transport Services
  99.  
  100.    This protocol is designed to run over connection-oriented, reliable
  101.    transports, with all 8 bits in an octet being significant in the data
  102.    stream.  Specifications for two underlying services are defined here,
  103.    though others are also possible.
  104.  
  105. 3.1.  Transmission Control Protocol (TCP)
  106.  
  107.    The LDAPMessage PDUs are mapped directly onto the TCP bytestream.
  108.    Server implementations running over the TCP should provide a protocol
  109.    listener on port 389.
  110.  
  111.  
  112.  
  113.  
  114. Yeong, Howes & Kille                                            [Page 2]
  115.  
  116. RFC 1487                       X.500 LDAP                      July 1993
  117.  
  118.  
  119. 3.2.  Connection Oriented Transport Service (COTS)
  120.  
  121.    The connection is established.  No special special use of T-Connect
  122.    is made.  Each LDAPMessage PDU is mapped directly onto T-Data.
  123.  
  124. 4.  Elements of Protocol
  125.  
  126.    For the purposes of protocol exchanges, all protocol operations are
  127.    encapsulated in a common envelope, the LDAPMessage, which is defined
  128.    as follows:
  129.  
  130.      LDAPMessage ::=
  131.          SEQUENCE {
  132.               messageID      MessageID,
  133.               protocolOp     CHOICE {
  134.                                   bindRequest         BindRequest,
  135.                                   bindResponse        BindResponse,
  136.                                   unbindRequest       UnbindRequest
  137.                                   searchRequest       SearchRequest,
  138.                                   searchResponse      SearchResponse,
  139.                                   modifyRequest       ModifyRequest,
  140.                                   modifyResponse      ModifyResponse,
  141.                                   addRequest          AddRequest,
  142.                                   addResponse         AddResponse,
  143.                                   delRequest          DelRequest,
  144.                                   delResponse         DelResponse,
  145.                                   modifyRDNRequest    ModifyRDNRequest,
  146.                                   modifyRDNResponse   ModifyRDNResponse,
  147.                                   compareDNRequest    CompareRequest,
  148.                                   compareDNResponse   CompareResponse,
  149.                                   abandonRequest      AbandonRequest
  150.                              }
  151.          }
  152.  
  153.      MessageID ::= INTEGER (0 .. MaxInt)
  154.  
  155.    The function of the LDAPMessage is to provide an envelope containing
  156.    common fields required in all protocol exchanges. At this time the
  157.    only common field is a message ID, which is required to have a value
  158.    different from the values of any other requests outstanding in the
  159.    LDAP session of which this message is a part.
  160.  
  161.    The message ID value must be echoed in all LDAPMessage envelopes
  162.    encapsulting responses corresponding to the request contained in the
  163.    LDAPMessage in which the message ID value was originally used.
  164.  
  165.    In addition to the LDAPMessage defined above, the following
  166.    definitions are also used in defining protocol operations:
  167.  
  168.  
  169.  
  170. Yeong, Howes & Kille                                            [Page 3]
  171.  
  172. RFC 1487                       X.500 LDAP                      July 1993
  173.  
  174.  
  175.      IA5String ::= OCTET STRING
  176.  
  177.    The IA5String is a notational convenience to indicate that, although
  178.    strings of IA5String type encode as OCTET STRING types, the legal
  179.    character set in such strings is limited to the IA5 character set.
  180.  
  181.      LDAPDN ::= IA5String
  182.  
  183.      RelativeLDAPDN ::= IA5String
  184.  
  185.    An LDAPDN and a RelativeLDAPDN are respectively defined to be the
  186.    representation of a Distinguished Name and a Relative Distinguished
  187.    Name after encoding according to the specification in [5], such that
  188.  
  189.      <distinguished-name> ::= <name>
  190.  
  191.      <relative-distinguished-name> ::= <name-component>
  192.  
  193.    where <name> and <name-component> are as defined in [5].
  194.  
  195.      AttributeValueAssertion ::=
  196.          SEQUENCE {
  197.               attributeType       AttributeType
  198.               attributeValue      AttributeValue
  199.          }
  200.  
  201.    The AttributeValueAssertion type definition  is similar to the one in
  202.    the Directory standards.
  203.  
  204.      AttributeType ::= IA5String
  205.  
  206.      AttributeValue ::= OCTET STRING
  207.  
  208.    An AttributeType value takes on as its value the textual string
  209.    associated with that AttributeType in the Directory standards. For
  210.    example, the AttributeType 'organizationName' with object identifier
  211.    2.5.4.10 is represented as an AttributeType in this protocol by the
  212.    string "organizationName".  In the event that a protocol
  213.    implementation encounters an Attribute Type with which it cannot
  214.    associate a textual string, an ASCII string encoding of the object
  215.    identifier associated with the Attribute Type may be subsitituted.
  216.    For example, the organizationName AttributeType may be represented by
  217.    the ASCII string "2.5.4.10" if a protocol implementation is unable to
  218.    associate the string "organizationName" with it.
  219.  
  220.    A field of type AttributeValue takes on as its value an octet string
  221.    encoding of a Directory AttributeValue type. The definition of these
  222.    string encodings for different Directory AttributeValue types may be
  223.  
  224.  
  225.  
  226. Yeong, Howes & Kille                                            [Page 4]
  227.  
  228. RFC 1487                       X.500 LDAP                      July 1993
  229.  
  230.  
  231.    found in companions to this document that define the encodings of
  232.    various attribute syntaxes such as [6].
  233.  
  234.      LDAPResult ::=
  235.          SEQUENCE {
  236.              resultCode    ENUMERATED {
  237.                              success                      (0),
  238.                              operationsError              (1),
  239.                              protocolError                (2),
  240.                              timeLimitExceeded            (3),
  241.                              sizeLimitExceeded            (4),
  242.                              compareFalse                 (5),
  243.                              compareTrue                  (6),
  244.                              authMethodNotSupported       (7),
  245.                              strongAuthRequired           (8),
  246.                              noSuchAttribute              (16),
  247.                              undefinedAttributeType       (17),
  248.                              inappropriateMatching        (18),
  249.                              constraintViolation          (19),
  250.                              attributeOrValueExists       (20),
  251.                              invalidAttributeSyntax       (21),
  252.                              noSuchObject                 (32),
  253.                              aliasProblem                 (33),
  254.                              invalidDNSyntax              (34),
  255.                              isLeaf                       (35),
  256.                              aliasDereferencingProblem    (36),
  257.                              inappropriateAuthentication  (48),
  258.                              invalidCredentials           (49),
  259.                              insufficientAccessRights     (50),
  260.                              busy                         (51),
  261.                              unavailable                  (52),
  262.                              unwillingToPerform           (53),
  263.                              loopDetect                   (54),
  264.                              namingViolation              (64),
  265.                              objectClassViolation         (65),
  266.                              notAllowedOnNonLeaf          (66),
  267.                              notAllowedOnRDN              (67),
  268.                              entryAlreadyExists           (68),
  269.                              objectClassModsProhibited    (69),
  270.                              other                        (80)
  271.                            },
  272.              matchedDN     LDAPDN,
  273.              errorMessage  IA5String
  274.          }
  275.  
  276.    The LDAPResult is the construct used in this protocol to return
  277.    success or failure indications from servers to clients. In response
  278.    to various requests, servers will return responses containing fields
  279.  
  280.  
  281.  
  282. Yeong, Howes & Kille                                            [Page 5]
  283.  
  284. RFC 1487                       X.500 LDAP                      July 1993
  285.  
  286.  
  287.    of type LDAPResult to indicate the final status of a protocol
  288.    operation request.  The errorMessage field of this construct may, at
  289.    the servers option, be used to return an ASCII string containing a
  290.    textual, human-readable error diagnostic. As this error diagnostic is
  291.    not standardized, implementations should not rely on the values
  292.    returned.  If the server chooses not to return a textual diagnostic,
  293.    the errorMessage field of the LDAPResult type should contain a zero
  294.    length string.
  295.  
  296.    For resultCodes of noSuchObject, aliasProblem, invalidDNSyntax,
  297.    isLeaf, and aliasDereferencingProblem, the matchedDN field is set to
  298.    the name of the lowest entry (object or alias) in the DIT that was
  299.    matched and is a truncated form of the name provided or, if an alias
  300.    has been dereferenced, of the resulting name.  The matchedDN field
  301.    should be set to NULL DN (a zero length string) in all other cases.
  302.  
  303. 4.1.  Bind Operation
  304.  
  305.    The function of the Bind Operation is to initiate a protocol session
  306.    between a client and a server, and to allow the authentication of the
  307.    client to the server. The Bind Operation must be the first operation
  308.    request received by a server from a client in a protocol session.
  309.    The Bind Request is defined as follows:
  310.  
  311.      BindRequest ::=
  312.          [APPLICATION 0] SEQUENCE {
  313.                              version   INTEGER (1 .. 127),
  314.                              name      LDAPDN,
  315.                              authentication CHOICE {
  316.                                   simple        [0] OCTET STRING,
  317.                                   krbv42LDAP    [1] OCTET STRING,
  318.                                   krbv42DSA     [2] OCTET STRING
  319.                              }
  320.          }
  321.  
  322.    Parameters of the Bind Request are:
  323.  
  324.    - version: A version number indicating the version of the protocol to
  325.      be used in this protocol session.  This document describes version
  326.      2 of the LDAP protocol.  Note that there is no version negotiation,
  327.      and the client should just set this parameter to the version it
  328.      desires.
  329.  
  330.    - name: The name of the Directory object that the client wishes to
  331.      bind as.  This field may take on a null value (a zero length
  332.      string) for the purposes of anonymous binds.
  333.  
  334.    - authentication: information used to authenticate the name, if any,
  335.  
  336.  
  337.  
  338. Yeong, Howes & Kille                                            [Page 6]
  339.  
  340. RFC 1487                       X.500 LDAP                      July 1993
  341.  
  342.  
  343.      provided in the Bind Request. The "simple" authentication option
  344.      provides minimal authentication facilities, with the contents of
  345.      the authentication field consisting only of a cleartext password.
  346.      This option should also be used when unauthenticated or anonymous
  347.      binds are to be performed, with the field containing a zero length
  348.      string in such cases. Kerberos version 4 [7] authentication to the
  349.      LDAP server and the DSA is accomplished by using the "krbv42LDAP"
  350.      and "krbv42DSA" authentication options, respectively.  Note that
  351.      though they are referred to as separate entities here, there is no
  352.      requirement these two entities be distinct (i.e., a DSA could speak
  353.      LDAP directly).  Two separate authentication options are provided
  354.      to support all implementations.  Each octet string should contain
  355.      the kerberos ticket (e.g., as returned by krb_mk_req()) for the
  356.      appropriate service.  The suggested service name for authentication
  357.      to the LDAP server is "ldapserver".  The suggested service name for
  358.      authentication to the DSA is "x500dsa".  In both cases, the
  359.      suggested instance name for the service is the name of the host
  360.      on which the service is running.  Of course, the actual service
  361.      names and instances will depend on what is entered in the local
  362.      kerberos principle database.
  363.  
  364.    The Bind Operation requires a response, the Bind Response, which is
  365.    defined as:
  366.  
  367.      BindResponse ::= [APPLICATION 1] LDAPResult
  368.  
  369.    A Bind Response consists simply of an indication from the server of
  370.    the status of the client's request for the initiation of a protocol
  371.    session.
  372.  
  373.    Upon receipt of a Bind Request, a protocol server will authenticate
  374.    the requesting client if necessary, and attempt to set up a protocol
  375.    session with that client. The server will then return a Bind Response
  376.    to the client indicating the status of the session setup request.
  377.  
  378. 4.2.  Unbind Operation
  379.  
  380.    The function of the Unbind Operation is to terminate a protocol
  381.    session.  The Unbind Operation is defined as follows:
  382.  
  383.      UnbindRequest ::= [APPLICATION 2] NULL
  384.  
  385.    The Unbind Operation has no response defined. Upon transmission of an
  386.    UnbindRequest, a protocol client may assume that the protocol session
  387.    is terminated. Upon receipt of an UnbindRequest, a protocol server
  388.    may assume that the requesting client has terminated the session and
  389.    that all outstanding requests may be discarded.
  390.  
  391.  
  392.  
  393.  
  394. Yeong, Howes & Kille                                            [Page 7]
  395.  
  396. RFC 1487                       X.500 LDAP                      July 1993
  397.  
  398.  
  399. 4.3.  Search Operation
  400.  
  401.    The Search Operation allows a client to request that a search be
  402.    performed on its behalf by a server. The Search Request is defined as
  403.    follows:
  404.  
  405.      SearchRequest ::=
  406.          [APPLICATION 3] SEQUENCE {
  407.              baseObject    LDAPDN,
  408.              scope         ENUMERATED {
  409.                                 baseObject            (0),
  410.                                 singleLevel           (1),
  411.                                 wholeSubtree          (2)
  412.                            },
  413.              derefAliases  ENUMERATED {
  414.                                         neverDerefAliases     (0),
  415.                                         derefInSearching      (1),
  416.                                         derefFindingBaseObj   (2),
  417.                                         derefAlways           (3)
  418.                                    },
  419.              sizeLimit     INTEGER (0 .. MaxInt),
  420.              timeLimit     INTEGER (0 .. MaxInt),
  421.              attrsOnly     BOOLEAN,
  422.              filter        Filter,
  423.              attributes    SEQUENCE OF AttributeType
  424.      }
  425.  
  426.      Filter ::=
  427.          CHOICE {
  428.              and                [0] SET OF Filter,
  429.              or                 [1] SET OF Filter,
  430.              not                [2] Filter,
  431.              equalityMatch      [3] AttributeValueAssertion,
  432.              substrings         [4] SubstringFilter,
  433.              greaterOrEqual     [5] AttributeValueAssertion,
  434.              lessOrEqual        [6] AttributeValueAssertion,
  435.              present            [7] AttributeType,
  436.              approxMatch        [8] AttributeValueAssertion
  437.          }
  438.  
  439.      SubstringFilter
  440.          SEQUENCE {
  441.              type               AttributeType,
  442.              SEQUENCE OF CHOICE {
  443.                  initial        [0] IA5String,
  444.                  any            [1] IA5String,
  445.                  final          [2] IA5String
  446.              }
  447.  
  448.  
  449.  
  450. Yeong, Howes & Kille                                            [Page 8]
  451.  
  452. RFC 1487                       X.500 LDAP                      July 1993
  453.  
  454.  
  455.          }
  456.  
  457.    Parameters of the Search Request are:
  458.  
  459.    - baseObject: An LDAPDN that is the base object entry relative to
  460.      which the search is to be performed.
  461.  
  462.    - scope: An indicator of the scope of the search to be performed. The
  463.      semantics of the possible values of this field are identical to the
  464.      semantics of the scope field in the Directory Search Operation.
  465.  
  466.    - derefAliases: An indicator as to how alias objects should be handled
  467.      in searching.  The semantics of the possible values of this
  468.      field are, in order of increasing value:
  469.  
  470.              neverDerefAliases: do not dereference aliases in searching
  471.              or in locating the base object of the search;
  472.  
  473.              derefInSearching: dereference aliases in subordinates of
  474.              the base object in searching, but not in locating the
  475.              base object of the search;
  476.  
  477.              derefFindingBaseObject: dereference aliases in locating
  478.              the base object of the search, but not when searching
  479.              subordinates of the base object;
  480.  
  481.              derefAlways: dereference aliases both in searching and in
  482.              locating the base object of the search.
  483.  
  484.    - sizelimit: A sizelimit that restricts the maximum number of entries
  485.      to be returned as a result of the search. A value of 0 in this
  486.      field indicates that no sizelimit restrictions are in effect for
  487.      the search.
  488.  
  489.    - timelimit: A timelimit that restricts the maximum time (in seconds)
  490.      allowed for a search. A value of 0 in this field indicates that no
  491.      timelimit restrictions are in effect for the search.
  492.  
  493.    - attrsOnly: An indicator as to whether search results should contain
  494.      both attribute types and values, or just attribute types.  Setting
  495.      this field to TRUE causes only attribute types (no values) to be
  496.      returned.  Setting this field to FALSE causes both attribute types
  497.      and values to be returned.
  498.  
  499.    - filter: A filter that defines the conditions that must be fulfilled
  500.      in order for the search to match a given entry.
  501.  
  502.    - attributes: A list of the attributes from each entry found as a
  503.  
  504.  
  505.  
  506. Yeong, Howes & Kille                                            [Page 9]
  507.  
  508. RFC 1487                       X.500 LDAP                      July 1993
  509.  
  510.  
  511.      result of the search to be returned. An empty list signifies that
  512.      all attributes from each entry found in the search are to be
  513.      returned.
  514.  
  515.    The results of the search attempted by the server upon receipt of a
  516.    Search Request are returned in Search Responses, defined as follows:
  517.  
  518.  Search Response ::=
  519.      CHOICE {
  520.           entry          [APPLICATION 4] SEQUENCE {
  521.                               objectName     LDAPDN,
  522.                               attributes     SEQUENCE OF SEQUENCE {
  523.                                                   AttributeType,
  524.                                                   SET OF AttributeValue
  525.                                              }
  526.                          },
  527.           resultCode     [APPLICATION 5] LDAPResult
  528.       }
  529.  
  530.    Upon receipt of a Search Request, a server will perform the necessary
  531.    search of the DIT.
  532.  
  533.    The server will return to the client a sequence of responses
  534.    comprised of:
  535.  
  536.    - Zero or more Search Responses each consisting of an entry found
  537.      during the search; with the response sequence terminated by
  538.  
  539.    - A single Search Response containing an indication of success, or
  540.      detailing any errors that have occurred.
  541.  
  542.    Each entry returned will contain all attributes, complete with
  543.    associated values if necessary, as specified in the 'attributes'
  544.    field of the Search Request.
  545.  
  546.    Note that an X.500 "list" operation can be emulated by a one-level
  547.    LDAP search operation with a filter checking for the existence of the
  548.    objectClass attribute, and that an X.500 "read" operation can be
  549.    emulated by a base object LDAP search operation with the same filter.
  550.  
  551. 4.4.  Modify Operation
  552.  
  553.    The Modify Operation allows a client to request that a modification
  554.    of the DIB be performed on its behalf by a server.  The Modify
  555.    Request is defined as follows:
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Yeong, Howes & Kille                                           [Page 10]
  563.  
  564. RFC 1487                       X.500 LDAP                      July 1993
  565.  
  566.  
  567.  ModifyRequest ::=
  568.      [APPLICATION 6] SEQUENCE {
  569.           object         LDAPDN,
  570.           modification   SEQUENCE OF SEQUENCE {
  571.                               operation      ENUMERATED {
  572.                                                   add       (0),
  573.                                                   delete    (1),
  574.                                                   replace   (2)
  575.                                              },
  576.                               modification   SEQUENCE {
  577.                                                 type    AttributeType,
  578.                                                 values  SET OF
  579.                                                           AttributeValue
  580.                                              }
  581.                          }
  582.      }
  583.  
  584.    Parameters of the Modify Request are:
  585.  
  586.    - object: The object to be modified. The value of this field should
  587.      name the object to be modified after all aliases have been
  588.      dereferenced. The server will not perform any alias dereferencing in
  589.      determining the object to be modified.
  590.  
  591.    - A list of modifications to be performed on the entry to be modified.
  592.      The entire list of entry modifications should be performed
  593.      in the order they are listed, as a single atomic operation.  While
  594.      individual modifications may violate the Directory schema, the
  595.      resulting entry after the entire list of modifications is performed
  596.      must conform to the requirements of the Directory schema. The
  597.      values that may be taken on by the 'operation' field in each
  598.      modification construct have the following semantics respectively:
  599.  
  600.              add: add values listed to the given attribute, creating
  601.              the attribute if necessary;
  602.  
  603.              delete: delete values listed from the given attribute,
  604.              removing the entire attribute if no values are listed, or
  605.              if all current values of the attribute are listed for
  606.              deletion;
  607.  
  608.              replace: replace existing values of the given attribute
  609.              with the new values listed, creating the attribute if
  610.              necessary.
  611.  
  612.    The result of the modify attempted by the server upon receipt of a
  613.    Modify Request is returned in a Modify Response, defined as follows:
  614.  
  615.  
  616.  
  617.  
  618. Yeong, Howes & Kille                                           [Page 11]
  619.  
  620. RFC 1487                       X.500 LDAP                      July 1993
  621.  
  622.  
  623.      ModifyResponse ::= [APPLICATION 7] LDAPResult
  624.  
  625.    Upon receipt of a Modify Request, a server will perform the necessary
  626.    modifications to the DIB.
  627.  
  628.    The server will return to the client a single Modify Response
  629.    indicating either the successful completion of the DIB modification,
  630.    or the reason that the modification failed. Note that due to the
  631.    requirement for atomicity in applying the list of modifications in
  632.    the Modify Request, the client may expect that no modifications of
  633.    the DIB have been performed if the Modify Response received indicates
  634.    any sort of error, and that all requested modifications have been
  635.    performed if the Modify Response indicates successful completion of
  636.    the Modify Operation.
  637.  
  638. 4.5.  Add Operation
  639.  
  640.    The Add Operation allows a client to request the addition of an entry
  641.    into the Directory. The Add Request is defined as follows:
  642.  
  643.      AddRequest ::=
  644.          [APPLICATION 8] SEQUENCE {
  645.               entry          LDAPDN,
  646.               attrs          SEQUENCE OF SEQUENCE {
  647.                                   type          AttributeType,
  648.                                   values        SET OF AttributeValue
  649.                              }
  650.          }
  651.  
  652.    Parameters of the Add Request are:
  653.  
  654.    - entry: the Distinguished Name of the entry to be added. Note that
  655.      all components of the name except for the last RDN component must
  656.      exist for the add to succeed.
  657.  
  658.    - attrs: the list of attributes that make up the content of the entry
  659.      being added.
  660.  
  661.    The result of the add attempted by the server upon receipt of a Add
  662.    Request is returned in the Add Response, defined as follows:
  663.  
  664.      AddResponse ::= [APPLICATION 9] LDAPResult
  665.  
  666.    Upon receipt of an Add Request, a server will attempt to perform the
  667.    add requested. The result of the add attempt will be returned to the
  668.    client in the Add Response.
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Yeong, Howes & Kille                                           [Page 12]
  675.  
  676. RFC 1487                       X.500 LDAP                      July 1993
  677.  
  678.  
  679. 4.6.  Delete Operation
  680.  
  681.    The Delete Operation allows a client to request the removal of an
  682.    entry from the Directory. The Delete Request is defined as follows:
  683.  
  684.      DelRequest ::= [APPLICATION 10] LDAPDN
  685.  
  686.    The Delete Request consists only of the Distinguished Name of the
  687.    entry to be deleted.  The result of the delete attempted by the
  688.    server upon receipt of a Delete Request is returned in the Delete
  689.    Response, defined as follows:
  690.  
  691.      DelResponse ::= [APPLICATION 11] LDAPResult
  692.  
  693.    Upon receipt of a Delete Request, a server will attempt to perform
  694.    the entry removal requested. The result of the delete attempt will be
  695.    returned to the client in the Delete Response. Note that only leaf
  696.    objects may be deleted with this operation.
  697.  
  698. 4.7.  Modify RDN Operation
  699.  
  700.    The Modify RDN Operation allows a client to change the last component
  701.    of the name of an entry in the Directory. The Modify RDN Request is
  702.    defined as follows:
  703.  
  704.      ModifyRDNRequest ::=
  705.          [APPLICATION 12] SEQUENCE {
  706.               entry          LDAPDN,
  707.               newrdn         RelativeLDAPDN
  708.          }
  709.  
  710.    Parameters of the Modify RDN Request are:
  711.  
  712.    - entry: the name of the entry to be changed.
  713.  
  714.    - newrdn: the RDN that will form the last component of the new name.
  715.  
  716.    The result of the name change attempted by the server upon receipt of
  717.    a Modify RDN Request is returned in the Modify RDN Response, defined
  718.    as follows:
  719.  
  720.      ModifyRDNResponse ::= [APPLICATION 13] LDAPResult
  721.  
  722.    Upon receipt of a Modify RDN Request, a server will attempt to
  723.    perform the name change. The result of the name change attempt will
  724.    be returned to the client in the Modify RDN Response. The attributes
  725.    that make up the old RDN are deleted from the entry.
  726.  
  727.  
  728.  
  729.  
  730. Yeong, Howes & Kille                                           [Page 13]
  731.  
  732. RFC 1487                       X.500 LDAP                      July 1993
  733.  
  734.  
  735. 4.8.  Compare Operation
  736.  
  737.    The Compare Operation allows a client to compare an assertion
  738.    provided with an entry in the Directory. The Compare Request is
  739.    defined as follows:
  740.  
  741.      CompareRequest ::=
  742.          [APPLICATION 14] SEQUENCE {
  743.               entry          LDAPDN,
  744.               ava            AttributeValueAssertion
  745.          }
  746.  
  747.    Parameters of the Compare Request are:
  748.  
  749.    - entry: the name of the entry to be compared with.
  750.  
  751.    - ava: the assertion with which the entry is to be compared.
  752.  
  753.    The result of the compare attempted by the server upon receipt of a
  754.    Compare Request is returned in the Compare Response, defined as
  755.    follows:
  756.  
  757.      CompareResponse ::= [APPLICATION 15] LDAPResult
  758.  
  759.    Upon receipt of a Compare Request, a server will attempt to perform
  760.    the requested comparison. The result of the comparison will be
  761.    returned to the client in the Compare Response. Note that errors and
  762.    the result of comparison are all returned in the same construct.
  763.  
  764. 4.9.  Abandon Operation
  765.  
  766.    The function of the Abandon Operation is to allow a client to request
  767.    that the server abandon an outstanding operation.  The Abandon
  768.    Request is defined as follows:
  769.  
  770.      AbandonRequest ::= [APPLICATION 16] MessageID
  771.  
  772.    There is no response defined in the Abandon Operation. Upon
  773.    transmission of an Abandon Operation, a client may expect that the
  774.    operation identified by the Message ID in the Abandon Request has
  775.    been abandoned. In the event that a server receives an Abandon
  776.    Request on a Search Operation in the midst of transmitting responses
  777.    to that search, that server should cease transmitting responses to
  778.    the abandoned search immediately.
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Yeong, Howes & Kille                                           [Page 14]
  787.  
  788. RFC 1487                       X.500 LDAP                      July 1993
  789.  
  790.  
  791. 5.  Protocol Element Encodings
  792.  
  793.    The protocol elements of LDAP are encoded for exchange using the
  794.    Basic Encoding Rules (BER) [11] of ASN.1 [10]. However, due to the
  795.    high overhead involved in using certain elements of the BER, the
  796.    following additional restrictions are placed on BER-encodings of LDAP
  797.    protocol elements:
  798.  
  799.    (1)  Only the definite form of length encoding will be used.
  800.  
  801.    (2)  Bitstrings and octet strings will be encoded in the primitive form
  802.         only.
  803.  
  804. 6.  Security Considerations
  805.  
  806.    This version of the protocol provides facilities only for simple
  807.    authentication using a cleartext password, and for kerberos version 4
  808.    authentication.  Future versions of LDAP will likely include support
  809.    for other authentication methods.
  810.  
  811. 7.  Bibliography
  812.  
  813.    [1] The Directory: Overview of Concepts, Models and Service.  CCITT
  814.        Recommendation X.500, 1988.
  815.  
  816.    [2] Information Processing Systems -- Open Systems Interconnection --
  817.        The Directory: Overview of Concepts, Models and Service.  ISO/IEC
  818.        JTC 1/SC21; International Standard 9594-1, 1988.
  819.  
  820.    [3] Rose, M., "Directory Assistance Service", RFC 1202, Performance
  821.        Systems International, Inc., February 1991.
  822.  
  823.    [4] Howes, R., Smith, M., and B. Beecher, "DIXIE Protocol
  824.        Specification", RFC 1249, University of Michigan, August 1991.
  825.  
  826.    [5] Kille, S., "A String Representation of Distinguished Names", RFC
  827.        1485, ISODE Consortium, July 1993.
  828.  
  829.    [6] Howes, T., Kille, S., Yeong, W., and C. Robbins, "The String
  830.        Representation of Standard Attribute Syntaxes", RFC 1488,
  831.        University of Michigan, ISODE Consortium, Performance Systems
  832.        International, NeXor Ltd., July 1993.
  833.  
  834.    [7] Kerberos Authentication and Authorization System.  S.P. Miller,
  835.        B.C. Neuman, J.I. Schiller, J.H. Saltzer; MIT Project Athena
  836.        Documentation Section E.2.1, December 1987.
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Yeong, Howes & Kille                                           [Page 15]
  843.  
  844. RFC 1487                       X.500 LDAP                      July 1993
  845.  
  846.  
  847.    [8] The Directory: Models.  CCITT Recommendation X.501 ISO/IEC JTC
  848.        1/SC21; International Standard 9594-2, 1988.
  849.  
  850.    [9] The Directory: Abstract Service Definition.  CCITT Recommendation
  851.        X.511, ISO/IEC JTC 1/SC21; International Standard 9594-3, 1988.
  852.  
  853.   [10] Specification of Abstract Syntax Notation One (ASN.1).  CCITT
  854.        Recommendation X.208, 1988.
  855.  
  856.   [11] Specification of Basic Encoding Rules for Abstract Syntax
  857.        Notation One (ASN.1).  CCITT Recommendation X.209, 1988.
  858.  
  859. 9.  Security Considerations
  860.  
  861.    Security issues are not discussed in this memo.
  862.  
  863. 9.  Authors' Addresses
  864.  
  865.    Wengyik Yeong
  866.    PSI, Inc.
  867.    510 Huntmar Park Drive
  868.    Herndon, VA 22070
  869.    USA
  870.  
  871.    Phone: +1 703-450-8001
  872.    EMail: yeongw@psilink.com
  873.  
  874.  
  875.    Tim Howes
  876.    University of Michigan
  877.    ITD Research Systems
  878.    535 W William St.
  879.    Ann Arbor, MI 48103-4943
  880.    USA
  881.  
  882.    Phone: +1 313 747-4454
  883.    EMail: tim@umich.edu
  884.  
  885.  
  886.    Steve Kille
  887.    ISODE Consortium
  888.    PO Box 505
  889.    London
  890.    SW11 1DX
  891.    UK
  892.  
  893.    Phone: +44-71-223-4062
  894.    EMail: S.Kille@isode.com
  895.  
  896.  
  897.  
  898. Yeong, Howes & Kille                                           [Page 16]
  899.  
  900. RFC 1487                       X.500 LDAP                      July 1993
  901.  
  902.  
  903. Appendix A
  904.  
  905.                          Complete ASN.1 Definition
  906.  
  907. Lightweight-Directory-Access-Protocol DEFINITIONS ::=
  908.  
  909. IMPLICIT TAGS
  910.  
  911. BEGIN
  912.  
  913. LDAPMessage ::=
  914.     SEQUENCE {
  915.          messageID      MessageID,
  916.                         -- unique id in request,
  917.                         -- to be echoed in response(s)
  918.          protocolOp     CHOICE {
  919.                              searchRequest       SearchRequest,
  920.                              searchResponse      SearchResponse,
  921.                              modifyRequest       ModifyRequest,
  922.                              modifyResponse      ModifyResponse,
  923.                              addRequest          AddRequest,
  924.                              addResponse         AddResponse,
  925.                              delRequest          DelRequest,
  926.                              delResponse         DelResponse,
  927.                              modifyDNRequest     ModifyDNRequest,
  928.                              modifyDNResponse    ModifyDNResponse,
  929.                              compareDNRequest    CompareRequest,
  930.                              compareDNResponse   CompareResponse,
  931.                              bindRequest         BindRequest,
  932.                              bindResponse        BindResponse,
  933.                              abandonRequest      AbandonRequest,
  934.                              unbindRequest       UnbindRequest
  935.                         }
  936.     }
  937.  
  938. BindRequest ::=
  939.     [APPLICATION 0] SEQUENCE {
  940.          version        INTEGER (1 .. 127),
  941.                         -- current version is 2
  942.          name           LDAPDN,
  943.                         -- null name implies an anonymous bind
  944.          authentication CHOICE {
  945.                              simple        [0] OCTET STRING,
  946.                                        -- a zero length octet string
  947.                                        -- implies an unauthenticated
  948.                                        -- bind.
  949.                              krbv42LDAP    [1] OCTET STRING,
  950.                              krbv42DSA     [2] OCTET STRING
  951.  
  952.  
  953.  
  954. Yeong, Howes & Kille                                           [Page 17]
  955.  
  956. RFC 1487                       X.500 LDAP                      July 1993
  957.  
  958.  
  959.                                        -- values as returned by
  960.                                        -- krb_mk_req()
  961.                                        -- Other values in later
  962.                                        -- versions of this protocol.
  963.                         }
  964.     }
  965.  
  966. BindResponse ::= [APPLICATION 1] LDAPResult
  967.  
  968. UnbindRequest ::= [APPLICATION 2] NULL
  969.  
  970. SearchRequest ::=
  971.     [APPLICATION 3] SEQUENCE {
  972.          baseObject     LDAPDN,
  973.          scope          ENUMERATED {
  974.                              baseObject            (0),
  975.                              singleLevel           (1),
  976.                              wholeSubtree          (2)
  977.                         },
  978.          derefAliases   ENUMERATED {
  979.                              neverDerefAliases     (0),
  980.                              derefInSearching      (1),
  981.                              derefFindingBaseObj   (2),
  982.                              alwaysDerefAliases    (3)
  983.                         },
  984.          sizeLimit      INTEGER (0 .. MaxInt),
  985.                         -- value of 0 implies no sizelimit
  986.          timeLimit      INTEGER (0 .. MaxInt),
  987.                         -- value of 0 implies no timelimit
  988.          attrsOnly     BOOLEAN,
  989.                         -- TRUE, if only attributes (without values)
  990.                         -- to be returned.
  991.          filter         Filter,
  992.          attributes     SEQUENCE OF AttributeType
  993.     }
  994.  
  995. SearchResponse ::=
  996.     CHOICE {
  997.          entry          [APPLICATION 4] SEQUENCE {
  998.                              objectName     LDAPDN,
  999.                              attributes     SEQUENCE OF SEQUENCE {
  1000.                                               AttributeType,
  1001.                                               SET OF
  1002.                                                 AttributeValue
  1003.                                             }
  1004.                         },
  1005.          resultCode     [APPLICATION 5] LDAPResult
  1006.     }
  1007.  
  1008.  
  1009.  
  1010. Yeong, Howes & Kille                                           [Page 18]
  1011.  
  1012. RFC 1487                       X.500 LDAP                      July 1993
  1013.  
  1014.  
  1015. ModifyRequest ::=
  1016.     [APPLICATION 6] SEQUENCE {
  1017.          object         LDAPDN,
  1018.          modifications  SEQUENCE OF SEQUENCE {
  1019.                              operation     ENUMERATED {
  1020.                                              add      (0),
  1021.                                              delete   (1),
  1022.                                              replace  (2)
  1023.                                            },
  1024.                              modification  SEQUENCE {
  1025.                                              type     AttributeType,
  1026.                                              values   SET OF
  1027.                                                         AttributeValue
  1028.                                            }
  1029.                         }
  1030.     }
  1031.  
  1032.  
  1033. ModifyResponse ::= [APPLICATION 7] LDAPResult
  1034.  
  1035. AddRequest ::=
  1036.     [APPLICATION 8] SEQUENCE {
  1037.          entry          LDAPDN,
  1038.          attrs          SEQUENCE OF SEQUENCE {
  1039.                              type          AttributeType,
  1040.                              values        SET OF AttributeValue
  1041.                         }
  1042.     }
  1043.  
  1044. AddResponse ::= [APPLICATION 9] LDAPResult
  1045.  
  1046. DelRequest ::= [APPLICATION 10] LDAPDN
  1047.  
  1048. DelResponse ::= [APPLICATION 11] LDAPResult
  1049.  
  1050. ModifyRDNRequest ::=
  1051.     [APPLICATION 12] SEQUENCE {
  1052.          entry          LDAPDN,
  1053.          newrdn         RelativeLDAPDN -- old RDN always deleted
  1054.     }
  1055.  
  1056. ModifyRDNResponse ::= [APPLICATION 13] LDAPResult
  1057.  
  1058. CompareRequest ::=
  1059.     [APPLICATION 14] SEQUENCE {
  1060.          entry          LDAPDN,
  1061.          ava            AttributeValueAssertion
  1062.     }
  1063.  
  1064.  
  1065.  
  1066. Yeong, Howes & Kille                                           [Page 19]
  1067.  
  1068. RFC 1487                       X.500 LDAP                      July 1993
  1069.  
  1070.  
  1071. CompareResponse ::= [APPLICATION 15] LDAPResult
  1072.  
  1073. AbandonRequest ::= [APPLICATION 16] MessageID
  1074.  
  1075. MessageID ::= INTEGER (0 .. MaxInt)
  1076.  
  1077. LDAPDN ::= IA5String
  1078.  
  1079. RelativeLDAPDN ::= IA5String
  1080.  
  1081. Filter ::=
  1082.     CHOICE {
  1083.         and            [0] SET OF Filter,
  1084.         or             [1] SET OF Filter,
  1085.         not            [2] Filter,
  1086.         equalityMatch  [3] AttributeValueAssertion,
  1087.         substrings     [4] SubstringFilter,
  1088.         greaterOrEqual [5] AttributeValueAssertion,
  1089.         lessOrEqual    [6] AttributeValueAssertion,
  1090.         present        [7] AttributeType,
  1091.         approxMatch    [8] AttributeValueAssertion
  1092.     }
  1093.  
  1094. LDAPResult ::=
  1095.     SEQUENCE {
  1096.         resultCode    ENUMERATED {
  1097.                         success                      (0),
  1098.                         operationsError              (1),
  1099.                         protocolError                (2),
  1100.                         timeLimitExceeded            (3),
  1101.                         sizeLimitExceeded            (4),
  1102.                         compareFalse                 (5),
  1103.                         compareTrue                  (6),
  1104.                         authMethodNotSupported       (7),
  1105.                         strongAuthRequired           (8),
  1106.                         noSuchAttribute              (16),
  1107.                         undefinedAttributeType       (17),
  1108.                         inappropriateMatching        (18),
  1109.                         constraintViolation          (19),
  1110.                         attributeOrValueExists       (20),
  1111.                         invalidAttributeSyntax       (21),
  1112.                         noSuchObject                 (32),
  1113.                         aliasProblem                 (33),
  1114.                         invalidDNSyntax              (34),
  1115.                         isLeaf                       (35),
  1116.                         aliasDereferencingProblem    (36),
  1117.                         inappropriateAuthentication  (48),
  1118.                         invalidCredentials           (49),
  1119.  
  1120.  
  1121.  
  1122. Yeong, Howes & Kille                                           [Page 20]
  1123.  
  1124. RFC 1487                       X.500 LDAP                      July 1993
  1125.  
  1126.  
  1127.                         insufficientAccessRights     (50),
  1128.                         busy                         (51),
  1129.                         unavailable                  (52),
  1130.                         unwillingToPerform           (53),
  1131.                         loopDetect                   (54),
  1132.                         namingViolation              (64),
  1133.                         objectClassViolation         (65),
  1134.                         notAllowedOnNonLeaf          (66),
  1135.                         notAllowedOnRDN              (67),
  1136.                         entryAlreadyExists           (68),
  1137.                         objectClassModsProhibited    (69),
  1138.                         other                        (80)
  1139.                       },
  1140.         matchedDN     LDAPDN,
  1141.         errorMessage  IA5String
  1142.     }
  1143.  
  1144. AttributeType ::= IA5String
  1145.                 -- text name of the attribute, or dotted
  1146.                 -- OID representation
  1147.  
  1148. AttributeValue ::= OCTET STRING
  1149.  
  1150. AttributeValueAssertion ::=
  1151.     SEQUENCE {
  1152.         attributeType        AttributeType,
  1153.         attributeValue       AttributeValue
  1154.     }
  1155.  
  1156. SubstringFilter
  1157.     SEQUENCE {
  1158.         type               AttributeType,
  1159.         SEQUENCE OF CHOICE {
  1160.           initial          [0] IA5String,
  1161.           any              [1] IA5String,
  1162.           final            [2] IA5String
  1163.       }
  1164.     }
  1165.  
  1166. IA5String ::= OCTET STRING
  1167.  
  1168. MaxInt ::= 65535
  1169. END
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Yeong, Howes & Kille                                           [Page 21]
  1179.  
  1180.